const FeedBack = () => import('@/pages/FeedBack'),
      Order = () => import('@/pages/OrderWait/OrderWait.vue'),
      UserInfo = () => import('@/pages/UserInfo'),
      CaiMin = () => import('@/pages/CaiMin'),
      OrderDetail = () => import('@/pages/CaiMinOrders'),
      winDraw = () => import('@/pages/Win&Draw/index'),
      DrawDetail = () => import('@/pages/DrawDetail/index'),
      winDetail = () => import('@/pages/winDetail/index'),
      MyQrCode = () => import('@/pages/MyQrCode'),
      WeiQrCode = () => import('@/pages/WeiQrCode'),
      UpLoad = () => import('@/pages/UpLoad'),
      MyOrders = () => import('@/pages/MyOrders'),
      Set = () => import('@/pages/Set/Set.vue'),
      PersonCenter = () => import('@/pages/PersonCenter/PersonCenter.vue'),
      BindSite = () => import ('@/pages/BindSite/BindSite.vue'),
      FeedBackDetail = () => import ('@/pages/OrderDetail'),
      OrderDetailWait = () => import ('@/pages/OrderDetailWait'),
      OrderCancel = () => import ('./../pages/orderCancel/OrderCancel.vue'),
      Returning = () => import ('./../pages/Returning'),
      $useInfo = '/useInfo',
      $feedBack = '/feedBack',
      $order = '/order';

import Store from './../store/index'

export default [
  {
    path:$feedBack,
    name: 'feedBack',
    meta: { navShow: true},
    component:FeedBack
  },
  {
    path:$feedBack+'/feedBackDetail/:pageId',
    name: 'FeedBackDetail',
    meta: { navShow: false},
    component:FeedBackDetail
  },




  {
    path:$order,
    name: 'order',
    meta: { navShow: true},
    component:Order,
    beforeEnter:(to,from,next)=>{
      if(from.name !== 'orderTaking' && from.path !== '/order/orderTaking'){
        Store.dispatch('select','');
      }
      next();
    }
  },
  {
    path:$order+'/orderDetailWait/:pageId',
    name: 'OrderDetailWait',
    meta: { navShow: false},
    component:OrderDetailWait
  },
  {
      path:$order+'/returning/:pageId',
      name: 'Returning',
      meta: { navShow: false},
      component:Returning
  },
  {
    path:$order+'/orderTaking/orderDetail/:pageId',
    name: 'OrderDetailWait',
    meta: { navShow: false},
    component:OrderDetailWait
  },
  {
    path:$order+'/OrderCancel/:pageId',
    name: 'OrderCancel',
    meta: { navShow: false},
    component:OrderCancel
  },





  {
    path:$useInfo,
    name: 'useInfo',
    meta: { navShow: true},
    component:UserInfo
  },
  {
    path:$useInfo+'/caimin',
    name: 'caimin',
    meta: { navShow: true},
    component:CaiMin
  },
  {
    path: $useInfo+'/myQrCode',
    name: 'MyQrCode',
    meta: { navShow: true},
    component: MyQrCode
  },
  {
    path: $useInfo+'/weiQrCode',
    name: 'weiQrCode',
    meta: { navShow: true},
    component: WeiQrCode
  },
  {
    path: $useInfo+'/upLoad',
    name: 'UpLoad',
    meta: { navShow: true},
    component: UpLoad
  },
  {
    path: $useInfo+'/myOrders',
    name: 'MyOrders',
    meta: { navShow: true},
    component: MyOrders
  },
  {
    path: $useInfo+'/set',
    name: 'Set',
    meta: { navShow: true},
    component: Set
  },
  {
    path: $useInfo+'/personCenter',
    name: 'PersonCenter',
    meta: { navShow: true},
    component: PersonCenter
  },
  {
    path: $useInfo+'/winDraw',
    name: 'winDraw',
    meta: { navShow: true},
    component: winDraw
  },
  {
    path: $useInfo+'/bindSite',
    name: 'BindSite',
    meta: { navShow: true},
    component: BindSite
  },
  {
    path: $useInfo+'/DrawDetail',
    name: 'DrawDetail',
    meta: { navShow: true},
    component: DrawDetail
  },
  {
    path: $useInfo+'/winDetail',
    name: 'winDetail',
    meta: { navShow: true},
    component: winDetail
  },

  {
    path: $useInfo+'/OrderDetail/:pageId',
    name: 'OrderDetail',
    meta: { navShow: false},
    component: OrderDetail
  },
  {
    path:'/',
    redirect:$order
  },
  {
    path:'*',
    redirect:$order
  }
]


